package net.dgg.zz.credential.qualification.dao;


import net.dgg.zz.credential.qualification.entity.Qualification;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * 资质
 */
@Component
public interface QualificationDao {

    int deleteByPrimaryKey(Long id);

    int insert(Qualification record);

    int insertSelective(Qualification record);

    Qualification selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Qualification record);

    int updateByPrimaryKey(Qualification record);

    /**
     * 根据id查询资质全部信息
     *
     * @param id
     * @return
     */
    Map findById(Long id);

    /**
     * 根据条件查询
     *
     * @param params
     * @return
     */
    List<Map> queryDataWithPage(Map params);

    /**
     * 根据条件查询库容
     *
     * @param params
     * @return
     */
    List<Map> findStorageWarningWithPage(Map params);

    /**
     * 总览的数据查询
     *
     * @param params
     * @return
     */
    Long countPandectTotal(Map params);

    /**
     * <p>@Description 资质匹配搜索的: 资质列表数据</p>
     * <p>@author mqy</p>
     * <p>@Time 2018/8/29 0029 15:37 创建时间</p>
     * <p>@return</p>
     */
    List<Qualification> findMatchDataWithPage(Map params);

    /**
     * <p>@Description 生产订单详情搜索搜索的</p>
     * <p>@author mqy</p>
     * <p>@Time 2018/8/31 0031 11:28 创建时间</p>
     * <p>@return</p>
     */
    List<Map> findQualificationDetailData(Map params);

    /**
     * <p>@Description 根据条件查统计: 初步用于根据生产订单ID查绑定了多少个资质</p>
     * <p>@author mqy</p>
     * <p>@Time 2018/8/29 0028 11:30 创建时间</p>
     * <p>@return</p>
     */
    Integer queryQualificationProductNumber(Map params);

    /*
     * @Author zsx
     * @Date 2018-09-05 08:09:38
     * @Description  根据事业部获取资质过期预警
     * @param params
     * @return List<Map>
     */
    List<Map<String, Object>> selectSignOrgExpirationWarningWithPage(Map<String, Object> params);

    /*
     * @Author zsx
     * @Date 2018-09-05 08:09:38
     * @Description 分页获取所有资质预警
     * @param params
     * @return  List<Map>
     */
    List<Map<String, Object>> selectAllExpirationWarningWithPage(Map<String, Object> params);

    /*
     * @Author zsx
     * @Date 2018-09-13 07:09:31
     * @Description 统计资质数量
     * @param params
     * @return  Map<String ,Object>
     */
    Map<String, Object> findAptitudecount(Map<String, Object> params);

}